package com.atguigu.gulimall.ware.service;

import com.atguigu.common.to.HasStockTo;
import com.atguigu.gulimall.ware.entity.WareOrderTaskDetailEntity;
import com.atguigu.gulimall.ware.to.LockStockResultVo;
import com.atguigu.gulimall.ware.to.LockStockTo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.ware.entity.WareSkuEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author tr
 * @email tr@gmail.com
 * @date 2023-04-19 13:43:23
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void updateByPurchase(Long skuId, Long wareId, Integer skuNum);

    List<HasStockTo> getHasStock(List<Long> skusIds);

    Boolean lock(LockStockTo lockStockTo);

    void unlock(List<WareOrderTaskDetailEntity> taskDetailEntities);
}

